package com.aaa.dang.modules.user.service.impl;

import com.aaa.dang.common.systemconst.ISystemConst;
import com.aaa.dang.common.util.ResultModel;
import com.aaa.dang.modules.user.dao.IStatisticsDao;
import com.aaa.dang.modules.user.service.IStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;

/**
 * @author JinChaoLiang
 * @calss QY87
 * @description 描述
 * @date 2018/12/26
 */
@Service
public class StatisticsServiceImpl implements IStatisticsService {

    @Autowired
    private IStatisticsDao staDao;

    @Override
    public ResultModel getMoneyList(Map<String, Object> query) {

        ResultModel rm = new ResultModel();
        List<Map<String, Object>> list = new ArrayList<>();
        list = staDao.getMoneyList(query);
        rm.setCode(ISystemConst.SUCCESS_CODE);
        rm.setData(list);
        return rm;
    }

    @Override
    public ResultModel getStuMoneyList(Map<String, Object> query) {
        ResultModel rm = new ResultModel();
        List<Map<String, Object>> list = new ArrayList<>();
        list = staDao.getStuMoneyList(query);
        rm.setCode(ISystemConst.SUCCESS_CODE);
        rm.setData(list);
        return rm;
    }
}
